package nofactory.controller;

import nofactory.dao.AiQiYiMember;
import nofactory.dao.DiscountInfo;
import nofactory.dao.SmallGiftInfo;
import nofactory.service.AiQiYiService;
import nofactory.service.DiscountService;
import nofactory.service.SmallGiftService;

/**
 * @Author liangbaigao
 * @Date 2023/9/25 11:14
 */
public class Client {

    public void sendByType(String type){
        //奖品类型: 1 打折券 ,2 爱奇艺会员,3 小礼品
        if("1".equals(type)){
            DiscountService discountService = new DiscountService();
            DiscountInfo discountInfo = new DiscountInfo();
            discountService.sendDiscount(discountInfo);
        } else if ("2".equals(type)) {
            AiQiYiService aiQiYiService = new AiQiYiService();
            AiQiYiMember aiQiYiMember = new AiQiYiMember();
            aiQiYiMember.setUserName("张三");
            aiQiYiMember.setUserPhone("13812015488");
            aiQiYiMember.setOrderId("1");
            aiQiYiMember.setRelEmail("xxx@qq.com");
            aiQiYiService.sendMember(aiQiYiMember);
        } else if ("3".equals(type)) {
            SmallGiftService smallGiftService = new SmallGiftService();
            smallGiftService.giveSmallGift(new SmallGiftInfo());
        }
    }

}
